package com.asyf;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

@SpringBootApplication
@RestController
public class JenkinsTestApplication {

    public static void main(String[] args) {
        //git地址: https://gitee.com/373616511/jenkins-test.git
        SpringApplication.run(JenkinsTestApplication.class, args);
        System.out.println("http://localhost:8090/test");
    }


    @RequestMapping(value = "test")
    public Map<String, String> test() {
        Map<String, String> map = new HashMap<>();
        map.put("说明:", "jenkins自动部署测试，版本503" +
                "");
        map.put("a", "sss");
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Date date = new Date();
        String dateStr = sdf.format(date);
        map.put("dateStr", dateStr);
        //注释

        return map;
    }
}
